package com.centit.framework.ip.businessdata.service.impl;

import com.alibaba.fastjson.JSONArray;
import com.centit.framework.ip.businessdata.dao.InterfaceLogDao;
import com.centit.framework.ip.businessdata.po.InterfaceLog;
import com.centit.framework.ip.businessdata.service.InterfaceLogManager;
import com.centit.framework.jdbc.service.BaseEntityManagerImpl;
import com.centit.support.database.utils.PageDesc;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * InterfaceLog  Service.
 * create by scaffold 2018-05-22
 *
 * @author guo_jh
 * T_INTERFACE_LOG接口调用日志
 */
@Service
public class InterfaceLogManagerImpl
        extends BaseEntityManagerImpl<InterfaceLog, String, InterfaceLogDao>
        implements InterfaceLogManager {

    public static final Log log = LogFactory.getLog(InterfaceLogManager.class);


    private InterfaceLogDao interfaceLogDao;

    @Resource(name = "interfaceLogDao")
    @NotNull
    public void setInterfaceLogDao(InterfaceLogDao baseDao) {
        this.interfaceLogDao = baseDao;
        setBaseDao(this.interfaceLogDao);
    }

    /*
         @PostConstruct
        public void init() {

        }

     */
    @Override
    @Transactional(propagation = Propagation.REQUIRED)
    public JSONArray listInterfaceLogsAsJson(
            String[] fields,
            Map<String, Object> filterMap, PageDesc pageDesc) {

        return null;
    }

}

